import http from '@/utils/http'
// import { AxiosRequestConfig } from 'axios'
export interface AppReqData {
  name: string,
  age: string,
  sex: string,
  id?: number
}

export const getAppList = (params?: Record<string, any>) => {
  return http.get('/api/app/apps', {
    params
  })
}
export const createApp = (data: AppReqData) => {
  return http.post('/api/app/apps', { data })
}
export const deleteApp = (id: number) => {
  
  return http.delete('/api/app/apps', {
    params: {
      id
    }
  })
}
export const editApp = (id: number, data: AppReqData) => {
  return http.put('/api/app/apps', {
    params: {
      id
    },
    data
  })
}